<%--
    Document   : postjob
    Created on : Apr 3, 2012, 5:02:02 PM
    Author     : project
--%>


<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.Connection"%>
<%@page import="jobportal.Dbconn"%>
<script>
    $(document).ready(function(){
        $("#EditProfile").validationEngine();

        $('#walkindate').datepicker({
            dateFormat: 'dd-M-yy',
            inline: true
        });

        $('#validuntil').datepicker({
            dateFormat: 'dd-M-yy',
            inline: true
        });
        $('#careerlevel').change(function(){


            if($('#careerlevel option:selected').val() == "2"){
                $("#mark10").show(1000);
                $("#mark12").show(1000);
                $("#markug").hide(1000);
                $("#markpg").hide(1000);
            }else if($('#careerlevel option:selected').val() == "3"){
                $("#mark10").show(1000);
                $("#mark12").show(1000);
                $("#markug").show(1000);
                $("#markpg").hide(1000);
            }else if($('#careerlevel option:selected').val() == "4"){
                $("#mark10").show(1000);
                $("#mark12").show(1000);
                $("#markug").show(1000);
                $("#markpg").show(1000);
            }else{
                $("#mark10").hide(1000);
                $("#mark12").hide(1000);
                $("#markug").hide(1000);
                $("#markpg").hide(1000);
            }
        });
        $("#mark10").hide(1000);
        $("#mark12").hide(1000);
        $("#markug").hide(1000);
        $("#markpg").hide(1000);
    });
</script>

<%
    String action = "";
    if (session.getAttribute("role") != null && session.getAttribute("role").toString().equalsIgnoreCase("admin")) {
        action = "../Company/PostJob";
    } else {
        action = "PostJob";
    }
    Connection con = Dbconn.getConn();
    Statement st = con.createStatement();
%>

<div class="mainheading_emp" style="clear:both;">Post a Job</div>
<br class="clear" />
<form action="<%=action%>" method="get" name="EditProfile" id="EditProfile">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" >

        <tr>
            <td align="left" valign="top"><table width="100%" border="0" cellpadding="1" cellspacing="0">


                    <tr>
                        <td height="687" align="center" valign="middle"><table width="100%" border="0" align="center" cellpadding="1" cellspacing="0" >
                                <tr>
                                    <td colspan="3" align="left" class="sde_mnu_hdr_blue">Job Description </td>
                                </tr>
                                <%
                                    if (session.getAttribute("role") != null && session.getAttribute("role").toString().equalsIgnoreCase("admin")) {
                                %>
                                <tr>
                                    <%

                                        ResultSet rs = st.executeQuery("select compid,compname from company where status='verified'");


                                    %>
                                    <td width="23%" height="32" align="left" valign="middle"  style="padding-left:5px;">Company Name<span class="messagesred">*</span> </td>
                                    <td width="2%" align="center" valign="middle">&nbsp;</td>
                                    <td width="75%" align="left" valign="middle"><span >
                                            <select name="compid" id="cmpidd">
                                                <%
                                                    while (rs.next()) {
                                                        out.print("<option value=\"" + rs.getString(1) + "\">" + rs.getString(1) + " | " + rs.getString(2) + "</option>");
                                                    }
                                                %>
                                            </select>
                                            <span id="check_jobtitle"></span>
                                        </span></td>
                                </tr>
                                <%} else {%>
                                <input type="hidden" name="compid" value="<%=session.getAttribute("username")%>">
                                <%}%>
                                <tr>
                                    <td width="23%" height="32" align="left" valign="middle"  style="padding-left:5px;">Job Title<span class="messagesred">*</span> </td>
                                    <td width="2%" align="center" valign="middle">&nbsp;</td>
                                    <td width="75%" align="left" valign="middle"><span >
                                            <input name="jobtitle" class="validate[required],custom[onlyLetterSp]" textbox" id="jobtitle" size="50" maxlength="255" autocomplete="off" /><span id="check_jobtitle"></span>
                                        </span></td>
                                </tr>

                                <tr>
                                    <td height="66" align="left" valign="top"  style="padding-left:5px;">Job Meta Keywords<span class="messagesred">*<br />
                                            <span class="style1">(For topping the  Search Result)</span></span></td>
                                    <td align="center" valign="top">&nbsp;</td>
                                    <td align="left" valign="top"><textarea name="metakeys" id="metakeys"  class="validate[required,length[3,140]]" style="width:250px; height:100px;"></textarea>
                                        <br />
                                        <strong>Note</strong> : Separate each keyword with comma(,) <strong>example</strong>: php, asp, flash and so on....</td>
                                </tr>

                                <!--<tr>
                                  <td height="42" colspan="3" align="left" valign="top"  style="padding-left:5px;"><span style="color:#0000FF;font-size:20px;">*</span><strong></strong></td>
                                  </tr>-->

                                <tr>
                                    <td height="221" align="left" valign="top"  style="padding-left:5px;">Job Description<span class="messagesred">*</span></td>
                                    <td align="center" valign="top">&nbsp;</td>
                                    <td align="left" valign="top">
                                        <textarea name="jobdesc" id="wysiwyg" class="validate[required,length[50,440]]" style="width:500px; height:200px;"></textarea>
                                        <br /></td>
                                </tr>
                                <tr style="padding-bottom: 10px">
                                    <td height="214" align="left" valign="top"  style="padding-left:5px;"><span  style="padding-left:5px;">Desired Profile<span class="messagesred">*</span></span></td>
                                    <td align="center" valign="top">&nbsp;</td>
                                    <td align="left" valign="top"><textarea name="desired_profile" id="wysiwyg1" class="validate[required,length[50,440]]" style="width:500px; height:200px;"></textarea></td>
                                </tr>
                                <tr style="padding-top: 5px;padding-bottom: 10px">
                                    <td height="44" align="left" valign="top"  style="padding-left:5px;">Test Venue<span class="messagesred">*</span></td>
                                    <td align="center" valign="top">&nbsp;</td>
                                    <td align="left" valign="top">
                                        <input type="text" name="venue" id="venue" class="validate[required]" />&nbsp;</td>
                                </tr>
                                <tr>
                                    <td height="32" align="left" valign="top"  style="padding-left:5px;">Walk in Date<span class="messagesred">*</span></td>
                                    <td align="center" valign="top">&nbsp;</td>
                                    <td align="left" valign="top"><span >
                                            <input name="walkindate"  class="validate[required] textbox" id="walkindate" size="20" autocomplete="off" readonly="readonly"  />
                                        </span></td>
                                </tr>
                                <tr>
                                    <td height="32" align="left" valign="top"  style="padding-left:5px;">Valid Until<span class="messagesred">*</span></td>
                                    <td align="center" valign="top">&nbsp;</td>
                                    <td align="left" valign="top"><span >
                                            <input name="validuntil" class="validate[required] textbox" id="validuntil" size="20" autocomplete="off" readonly="readonly" />
                                        </span></td>
                                </tr>
                            </table></td>
                    </tr>
                    <tr>
                        <td height="21" align="left" valign="middle">&nbsp;</td>
                    </tr>
                    <tr>
                        <td align="center" valign="middle"><table width="100%" border="0" cellpadding="1" cellspacing="0" >
                                <tr>
                                    <td height="21" colspan="6" align="left" valign="middle"  class="sde_mnu_hdr_blue">&nbsp;</td>
                                </tr>

                                <tr>
                                    <td width="23%" height="39" align="left" valign="middle"  style="padding-left:5px;">Employment Type <span class="messagesred">* </span></td>
                                    <td width="2%" height="39" align="center" valign="middle">&nbsp;</td>
                                    <td width="75%" height="39" colspan="4" align="left" valign="middle"><span >
                                            <select name="emp_type" id="emp_type" class="validate[required],listmenu" style="width:190px;">
                                                <option  value="Permanent">Permanent</option>
                                                <option  value="Temporary">Temporary</option>
                                                <option value="Perm & Temp">Perm & Temp </option>
                                                <option value="Part Time">Part Time</option>
                                            </select>
                                        </span></td>
                                </tr>

                                <tr>
                                    <td height="33" align="left" valign="middle"  style="padding-left:5px;">Job Role <span class="messagesred">* </span></td>
                                    <td height="33" align="center" valign="middle">&nbsp;</td>
                                    <td height="33" colspan="4" align="left" valign="middle"><span class="elements"><span >
                                                <input name="jobrole" type="text" class="validate[required],custom[onlyLetterSp],textbox" id="jobrole" maxlength="35" size="30" />
                                            </span></span></td>
                                </tr>
                                <tr>
                                    <td height="34" align="left" valign="middle"  style="padding-left:5px;">Functional area of vacancy<span class="messagesred">*</span></td>
                                    <td height="34" align="center" valign="middle">&nbsp;</td>
                                    <td height="34" colspan="4" align="left" valign="middle">

                                        <select name="category" style="width:190px;" class="validate[required],listmenu" id="category" onchange="showsubcat(this.value)">
                                            <option value="">Select Functional Area</option>
                                            <option value="Accounting-Tax/Consulting">Accounting-Tax/Consulting</option>
                                            <option value="Architecture Interior Design">Architecture Interior Design</option>
                                            <option value="Automobiles">Automobiles</option>
                                            <option value="Banking/Financial">Banking/Financial</option>
                                            <option value="Biotech/Pharma">Biotech/Pharma</option>
                                            <option value="BPO/KPO">BPO/KPO</option>
                                            <option value="Business management">Bussiness management</option>
                                            <option value="Construction/Engineering">Construction/Engineering</option>
                                            <option value="Entertainment/Media">Entertainment/Media</option>
                                            <option value="Graphic/Web Design">Graphic / Web Design</option>
                                            <option value="IT Hardware/Telecom">IT Hardware/Telecom</option>
                                            <option value="IT/Softwar Services">IT/Software Services</option>
                                            <option value="Software Development & Sales">Software Development & Sales</option>
                                            <option value="Supply Chain/purchase">Supply Chain/Purchase</option>
                                        </select>              </td>
                                </tr>

                                <tr>
                                    <td height="34" align="left" valign="middle"  style="padding-left:5px;">Salary</td>
                                    <td height="34" align="center" valign="middle">&nbsp;</td>
                                    <td height="34" colspan="4" align="left" valign="middle"><span >
                                            Upto
                                            <input name="salary" class="validate[required,custom[number]] input_small" id="salary" size="10" autocomplete="off" value="" />
                                            <span >
                                                <select name="current_sal_per" id="current_sal_per" class="validate[required],listmenu_small">

                                                    <option value="Anually">Anually</option>
                                                    <option value="Daily">Daily</option>
                                                    <option value="Hourly">Hourly</option>
                                                    <option value="Monthly">Monthly</option>
                                                    <option value="Weekly">Weekly</option>
                                                </select>
                                            </span><span > in INR</span></td>
                                </tr>

                                <tr>
                                    <td height="65" align="left" valign="top"  style="padding-left:5px;">Key Skills<span class="messagesred">* </span></td>
                                    <td height="65" align="center" valign="top">&nbsp;</td>
                                    <td height="65" colspan="4" align="left" valign="top"><span ><span >
                                                <textarea class="validate[required],textbox" id="keyskill" name="keyskill" rows="3" cols="40"></textarea>
                                            </span></span></td>
                                </tr>
                                <tr>
                                    <td height="23" rowspan="2" align="left" valign="top"  style="padding-left:5px;">Job location<span class="messagesred">* </span></td>
                                    <td height="31" align="center" valign="top">&nbsp;</td>
                                    <td height="31" colspan="4" align="left" valign="top" bordercolor="#111111" class="elements"><label>
                                            <input type="text" name="joblocation" id="joblocation" class="validate[required],custom[onlyLetterSp]" />
                                        </label></td>
                                </tr>


                            </table></td>
                    </tr>
                    <tr>
                        <td height="475">
                            <table width="100%" border="0" cellpadding="1" cellspacing="0" >
                                <tr>
                                    <td height="21" colspan="6" align="left" valign="middle"  class="sde_mnu_hdr_blue">Eligibility  Criteria </td>
                                </tr>
                                <tr>
                                    <td width="23%" height="36" align="left" valign="middle"  style="padding-left:5px;">Gender<span class="messagesred">* </span></td>
                                    <td width="2%" height="36" align="center" valign="middle">&nbsp;</td>
                                    <td width="75%" height="36" colspan="4" align="left" valign="middle" >
                                        <select name="gender"  class="validate[required], listmenu" id="gender">
                                            <option value="Male">Male</option>
                                            <option value="Female">Female</option>
                                            <option value="Both">Both</option>
                                        </select>										</td>
                                </tr>
                                <tr>
                                    <td width="23%" height="35" align="left" valign="middle"  style="padding-left:5px;">Nationality</td>
                                    <td width="2%" height="35" align="center" valign="middle">&nbsp;</td>
                                    <td height="35" colspan="4" align="left" valign="middle" ><input type="text" name="nationality" id="nationality" class="validate[required],custom[onlyLetterSp]" /></td>
                                </tr>

                                <tr>
                                    <td height="38" align="left" valign="middle"  style="padding-left:5px;">Career Level  <span class="messagesred">* </span></td>
                                    <td height="38" align="center" valign="middle">&nbsp;</td>
                                    <td height="38" colspan="4" align="left" valign="middle"><span class="elements">
                                            <select name="careerlevel" class="validate[required] listmenu" id="careerlevel" style="width:190px;">
                                                <option >Select Career Level</option>
                                                <option value="2">12th</option>
                                                <option value="3">Graduate</option>
                                                <option value="4">Post Graduate</option>
                                            </select>
                                        </span></td>
                                </tr>

                                <tr>
                                    <td height="23" align="left" valign="middle"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="31" align="center" valign="middle">&nbsp;</td>
                                    <td height="31" colspan="4" align="left" valign="middle"><table width="100%" border="0">
                                            <tr id="mark10">
                                                <td width="31%" height="30">Min Mark 10th</td>
                                                <td width="3%">:</td>
                                                <td width="66%"><input type="text" name="10" value="" />
                                                    % </td>
                                            </tr>
                                            <tr id="mark12">
                                                <td height="29">Min Mark 12th</td>
                                                <td>:</td>
                                                <td><input type="text" name="12" value="" />
                                                    %</td>
                                            </tr>
                                            <tr id="markug">
                                                <td height="44">Min Mark Under Graduate </td>
                                                <td>:</td>
                                                <td><input type="text" name="15" value="" />
                                                    %</td>
                                            </tr>
                                            <tr id="markpg">
                                                <td height="32">Min Mark Post Graduate </td>
                                                <td>:</td>
                                                <td><input type="text" name="18" value="" />
                                                    %</td>
                                            </tr>
                                        </table></td>
                                </tr>


                                <tr>
                                    <td height="157" align="left" valign="middle"  style="padding-left:5px;">Qualification<span class="messagesred">* </span></td>
                                    <td height="157" align="center" valign="middle">&nbsp;</td>
                                    <td height="157" colspan="4" align="left" valign="middle"><font size="2" face="Arial, Helvetica, sans-serif">
                                        <select name="qual"   multiple="multiple" class="validate[required], listmenu" id="qual" style="width:290px;height: 150px" >
                                            <%
                                            ResultSet rs=st.executeQuery("select course from course");
                                                while (rs.next()) {
                                                    out.print("<option value=\"" + rs.getString(1) + "\">" + rs.getString(1) +  "</option>");
                                                }
                                            %>

                                        </select>
                                        </font></td>
                                </tr>


                                <tr>
                                    <td height="34" align="left" valign="middle"  style="padding-left:5px;">Experience (in   years)<span class="messagesred">*</span></td>
                                    <td height="34" align="center" valign="middle">&nbsp;</td>
                                    <td height="34" colspan="4" align="left" valign="middle"><span >
                                            <select name="minexp" class="validate[required]" id="minexp" style="width:80px">
                                                <option value="-1">Min</option>
                                                <option value="0">0</option>
                                                <option value="1">1</option>
                                                <option value="2">2</option>
                                                <option value="3">3</option>
                                                <option value="4">4</option>
                                                <option value="5">5</option>
                                                <option value="6">6</option>
                                                <option value="7">7</option>
                                                <option value="8">8</option>
                                                <option value="9">9</option>
                                                <option value="10">10</option>
                                                <option value="11">11</option>
                                                <option value="12">12</option>
                                                <option value="13">13</option>
                                                <option value="14">14</option>
                                                <option value="15">15</option>
                                                <option value="16">16</option>
                                                <option value="17">17</option>
                                                <option value="18">18</option>
                                                <option value="19">19</option>
                                                <option value="20">20</option>
                                                <option value="21">21</option>
                                                <option value="22">22</option>
                                                <option value="23">23</option>
                                                <option value="24">24</option>
                                                <option value="25">25</option>
                                            </select>
                                            to<select name="maxexp" class="validate[required]" id="maxexp" style="width:80px">
                                                <option value="-1">Max</option>
                                                <option value="0">0</option>
                                                <option value="1">1</option>
                                                <option value="2">2</option>
                                                <option value="3">3</option>
                                                <option value="4">4</option>
                                                <option value="5">5</option>
                                                <option value="6">6</option>
                                                <option value="7">7</option>
                                                <option value="8">8</option>
                                                <option value="9">9</option>
                                                <option value="10">10</option>
                                                <option value="11">11</option>
                                                <option value="12">12</option>
                                                <option value="13">13</option>
                                                <option value="14">14</option>
                                                <option value="15">15</option>
                                                <option value="16">16</option>
                                                <option value="17">17</option>
                                                <option value="18">18</option>
                                                <option value="19">19</option>
                                                <option value="20">20</option>
                                                <option value="21">21</option>
                                                <option value="22">22</option>
                                                <option value="23">23</option>
                                                <option value="24">24</option>
                                                <option value="25">25</option>
                                            </select>

                                            Years of Experience</span></td>
                                </tr>
                            </table>                        </td>
                    </tr>
                    <tr>
                        <td align="center" valign="top"><table width="100%" border="0" cellpadding="1" cellspacing="0" >
                                <tr>
                                    <td height="21" colspan="3" align="left" valign="middle"  class="sde_mnu_hdr_blue">Contact Details <span class="messagesred">* </span></td>
                                </tr>

                                <tr>

                                    <td width="80%" align="left" valign="top"><table width="100%" border="0">
                                            <tr>
                                                <td ><strong>Name</strong><span id="check_contactname"></span></td>
                                                <td ><strong>Phone</strong></td>
                                                <td ><strong>Email </strong></td>
                                            </tr>
                                            <tr>
                                                <td width="25%" height="31"><input name="contname" class="validate[required], custom[onlyLetterSp],textbox" id="contname" autocomplete="off"  size="40"/></td>
                                                <td width="19%"><input name="contphone" class="validate[required,minSize[10],maxSize[11]], custom[phone],textbox" id="contphone" autocomplete="off" /></td>
                                                <td width="56%"><input name="contemail" class="validate[required], custom[email], textbox" id="contemail" size="40" autocomplete="off" /></td>
                                            </tr>

                                            <tr>

                                                <td height="30" colspan="3"><input type="checkbox" name="chkbx" id="chkbx" value="checkbox" class="validate[required] radio" />
                                                    All the details regarding this job is correct. </td>
                                            </tr>



                                        </table></td>
                                </tr>
                            </table></td>
                    </tr>
                    <tr>
                        <td align="left" valign="top"><%if (request.getAttribute("msg") != null && !request.getAttribute("msg").equals("")) {
                                out.println(request.getAttribute("msg"));
                                request.removeAttribute("msg");
                            }%></td>
                    </tr>
                    <tr>
                        <td width="41%" height="43" align="center" valign="top"><input name="Submit" type="submit" class="button2" value="Post Job    " /></td>
                    </tr>

                </table></td>
        </tr>
    </table>
</form>


